#!/bin/sh
# generate some comm code .
if [ $# -ne 1 ]; then
	echo "Usage: $0 codetag"
	exit
fi

if [ $1 = "css" ];then

	echo "CSS"
	
fi


if [ $1 = 'bookheader' ];then 

	source config

	printf "<center>[返回首页]($url) [本书名句]($url/mingju.html)  [本书注解]($url/memo.html)  [丰富目录]($url/index_rich.html)  [同读日历]($url/index_readcal.html)  [时间线]($url/index_timeline.html)  [引用书籍]($url/index_books.html)  [使用字频]($url/index_words.html)" 

	printf "<div id='wx_pic' style='margin:0 auto;display:none;'>"
	printf "<img src='/img/logo.png'/>"
	printf "</div>"

	if [ -e hash ]; then 
		printf " [HASH5]($url/hash/)"
	fi

	if [ -e dicts ]; then
		printf " [本书字典]($url/dicts/)"
	fi

	echo "</center>" 

fi

if [ $1 = 'bookfooter' ];then 

	source config
	printf "<hr>\n\n"
#![](/img/thanks.jpg)


	printf "<center><img src=\"/img/thanks.jpg\" width=\"50%%\" height=\"50%%\"></center>"

#	<img src="/img/thanks.jpg" width="50%" height="50%">

fi

if [ $1 = 'header' ];then 

#	printf "<center>[返回首页](/) [今日阅读](/index_quickview.html) [同读日历](/index_readcal.html) [第三书单](/booklist/)" 
	printf "<center>[返回首页](/) [第三书单](/booklist/) [HASH5](/index_hash5.html)" 

	echo "</center>" 

	printf "<hr>\n\n" 

fi

if [ $1 = 'footer' ];then 

	printf "\n\n## 联系我：\n\n" 

	echo "Follow me on : [Github](https://github.com/hbaolong)  [Gitee](https://gitee.com/hbaolong)   [发邮件](mailto:hbaolong@vip.qq.com)\n"

	echo "#公众号:一个说评书的小号\n"

	echo "#视频号:一个说评书的小号\n"

	echo "</p>"

	printf "<center>个人阅读平台 1.0 </center>"

	printf "<center>2024 NO right reserved. </center>"

	printf "\n\n<hr>\n\n" 

	printf "<center><strong>今日名句</strong></center>\n\n"

	cfortune

	printf "\n\n" 

	printf "<center>![](/aboutme.jpg)</center>" 

fi
